<template>
  <div>
    <el-table :data="memberliat" border style="width: 100%">
      <el-table-column prop="nickname" label="姓名"> </el-table-column>
      <el-table-column prop="phone" label="账户"> </el-table-column>
      <!-- <el-table-column label="性别">
        <template slot-scope="scoped">
          <el-button v-if="scoped.row.sex == 1" type="success">男</el-button>
          <el-button v-if="scoped.row.status == 2" type="info">女</el-button>
        </template>
      </el-table-column> -->
      <el-table-column label="状态">
        <template slot-scope="scoped">
          <el-button v-if="scoped.row.status == 1" type="success"
            >启用</el-button
          >
          <el-button v-if="scoped.row.status == 2" type="info">禁用</el-button>
        </template>
      </el-table-column>
      <el-table-column label="管理">
        <template slot-scope="scoped">
          <el-button @click="bj(scoped.row.uid)" type="primary">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { mapActions, mapGetters } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    ...mapGetters({
      memberliat: "memberList/list",
    }),
  },
  methods: {
    //编辑
    bj(uid) {
      this.$emit("aa", uid);
    },
    ...mapActions({
      asyncChangeList: "memberList/asyncChangeList",
    }),
  },
  mounted() {
    this.asyncChangeList();
  },
};
</script>

<style>
</style>